<!doctype html>
<html lang="en">

    <head>
        <meta charset="utf-8"/>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>

        <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/css/layout.css" type="text/css" media="screen" />
        <!--[if lt IE 9]>
        <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/css/ie.css" type="text/css" media="screen" />
        <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/css/form.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/css/main.css" type="text/css" media="screen" />

        <script src="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/js/jquery-1.5.2.min.js" type="text/javascript"></script>
        <script src="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/js/hideshow.js" type="text/javascript"></script>
        <script src="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/js/jquery.tablesorter.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/themes/x5/js/jquery.equalHeight.js"></script>

        <script type="text/javascript">
            $(document).ready(function() 
            { 
                $(".tablesorter").tablesorter(); 
            } 
        );
            $(document).ready(function() {

                //When page loads...
                $(".tab_content").hide(); //Hide all content
                $("ul.tabs li:first").addClass("active").show(); //Activate first tab
                $(".tab_content:first").show(); //Show first tab content

                //On Click Event
                $("ul.tabs li").click(function() {

                    $("ul.tabs li").removeClass("active"); //Remove any "active" class
                    $(this).addClass("active"); //Add "active" class to selected tab
                    $(".tab_content").hide(); //Hide all tab content

                    var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
                    $(activeTab).fadeIn(); //Fade in the active ID content
                    return false;
                });

            });
        </script>

        <script type="text/javascript">
            $(function(){
                $('.column').equalHeight();
            });
        </script>

    </head>

    <body>

        <header id="header">
            <hgroup>
                <h1 class="site_title"><a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php">NETadmin</a></h1>
                <h2 class="section_title"><?php echo CHtml::encode($this->pageTitle); ?></h2>
            </hgroup>
        </header> <!-- end of header bar -->

        <section id="secondary_bar">
            <div class="user">
                <p><?php
//if (Yii::app()->user->isGuest) echo "<a href='".Yii::app()->request->baseUrl."/themes/x5/views/site/login'>Login</a>"; else
//    echo "<a href='".Yii::app()->request->baseUrl."/themes/x5/views/site/logout'>Logout</a>";
if (Yii::app()->user->isGuest)
    echo "Anonymous <a href='index.php?r=site/login'>(Login)</a>"; else
    echo Yii::app()->user->name . "  (<a href='#'>3 Messages</a>)";
?></p>
                <!-- <a class="logout_user" href="#" title="Logout">Logout</a> -->
            </div>
            <div class="breadcrumbs_container">
                <article class="breadcrumbs">
                    <a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php">NETadmin</a>
                    <div class="breadcrumb_divider"></div>
                    <a class="current">
                        <?php
                        if (isset($this->breadcrumbs))
                            foreach ($this->breadcrumbs as $items) {
                                echo $items;
                            }
                        ?>
                    </a>
                </article>
            </div>
        </section><!-- end of secondary bar -->

        <aside id="sidebar" class="column">
        <?php if (!Yii::app()->user->isGuest) { ?>
                <h3>Content</h3>
                <ul class="toggle">
                    <li class="icn_new_article"><a href="#">New Article</a></li>
                    <li class="icn_edit_article"><a href="#">Edit Articles</a></li>
                    <li class="icn_categories"><a href="#">Categories</a></li>
                    <li class="icn_tags"><a href="#">Tags</a></li>
                </ul>
                <h3>Users</h3>
                <ul class="toggle">
                    <li class="icn_add_user"><a href="?r=users/add">Add New User</a></li>
                    <li class="icn_view_users"><a href="?r=users/manage_users">Manage Users</a></li>
                    <li class="icn_profile"><a href="#">Your Profile</a></li>
                </ul>
                <h3>Media</h3>
                <ul class="toggle">
                    <li class="icn_folder"><a href="#">File Manager</a></li>
                    <li class="icn_photo"><a href="#">Gallery</a></li>
                    <li class="icn_audio"><a href="#">Audio</a></li>
                    <li class="icn_video"><a href="#">Video</a></li>
                </ul>
                <h3>Admin</h3>
                <ul class="toggle">
                    <li class="icn_settings"><a href="#">Options</a></li>
                    <li class="icn_security"><a href="#">Security</a></li>
                    <li class="icn_jump_back"><a href='index.php?r=site/logout'>Logout</a></li>
                </ul>

                <footer>
                    <hr />
                    <p><strong>Copyright &copy; <?php echo date('Y'); ?> NETadmin<br/> free isp management system</strong></p>
                    <p>Theme by <a href="http://www.medialoot.com">MediaLoot.</a></p>
                    <p><?php echo Yii::powered(); ?></p>
                </footer>
            <?php } else { ?>
                <p><strong>Please login to see menu</strong></p>
        <?php } ?>
        </aside><!-- end of sidebar -->

        <section id="main" class="column">
            <?php
            echo $content;
            ?>
        </section>

    </body>

</html>